package com.wrh.draw.legend;

/**
 * @author wrh
 */
public enum DefaultLegendsEnum {

    /**
     * 气温
     */
    tem(new Legend()),

//    /**
//     * 最高气温
//     */
//    tem_max(new Legend()),
//
//    /**
//     * 最低气温
//     */
//    tem_min(new Legend()),

    /**
     * 24h累积降水
     */
    rain24(new Legend()),
    ;


    DefaultLegendsEnum(Legend legend) {
        this.legend = legend;
    }

    private final Legend legend;

    public Legend getLegend() {
        return legend;
    }

    static {
        tem.legend.setLegendId("tem")
                .setDes("气温色卡")
                .setLegendType(LegendTypeEnum.Open_Interval)
                .setName("温度")
                .setUnit("℃")
                .setHexColors("#012f87", "#1d5ca3", "#1e76d1", "#38a2f0", "#81d5f6", "#aae8f5", "#d2fbfd", "#f2ffed",
                        "#cfffd0", "#c0fe89", "#fdfd9d", "#fff3c4", "#fbd1a1", "#fc9589", "#fc5606", "#e50101")
                .setValues2(Float.NEGATIVE_INFINITY, -12, -8, -4, 0, 4, 8, 12, 16, 20, 24, 28, 32, 35, 37, 40, Float.POSITIVE_INFINITY)
                .setTexts2("-12", "-8", "-4", "0", "4", "8", "12", "16", "20", "24", "28", "32", "35", "37", "40");

        rain24.legend.setLegendId("rain24")
                .setDes("24h累积降水气温色卡")
                .setLegendType(LegendTypeEnum.CloseLeft_OpenRight_Interval)
                .setName("降水")
                .setUnit("mm")
                .setHexColors("#a5f38d", "#3db93f", "#63b8f9", "#0000fe", "#f305ee", "#810040")
                .setValues2( 0.1f, 10, 25, 50, 100, 250, Float.POSITIVE_INFINITY)
                .setTexts2("0.1", "10", "25", "50", "100", "250");
    }
}
